# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=loksh
pkgver=6.7.2
pkgrel=0
pkgdesc="A Linux port of OpenBSD's ksh"
url="https://github.com/dimkr/$pkgname"
arch="all"
license="ISC"
replaces="oksh"
makedepends="ncurses-dev meson"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
options="!check" # upstream doesn't have a test suite
subpackages="$pkgname-doc"
source="loksh-$pkgver.tar.xz::https://github.com/dimkr/loksh/releases/download/$pkgver/src.tar.xz"
builddir="$srcdir"/$pkgname

build() {
	meson \
		--prefix=/ \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--datadir=/usr/share \
		--localstatedir=/var \
		--buildtype=plain \
		--bindir=/bin \
		. output
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="0008905c97c0d65ab246c05ddcd733925cdf2e35bc0eb09dd4301718236cab3f2682bee250e3630f3f9d801c1e20ee2db71194ac01f9ea4c2c8ff437328f5d08  loksh-6.7.2.tar.xz"
